package br.com.SRP.Reports;

import br.com.SRP.Util.JPAUtil;

import java.io.File;
import java.io.FileInputStream;
import java.net.URL;
import java.util.List;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import net.sf.jasperreports.engine.JRDataSource;
import net.sf.jasperreports.engine.JasperCompileManager;
import net.sf.jasperreports.engine.JasperExportManager;
import net.sf.jasperreports.engine.JasperFillManager;
import net.sf.jasperreports.engine.JasperPrint;
import net.sf.jasperreports.engine.JasperReport;
import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource;
import net.sf.jasperreports.view.JasperViewer;

import org.apache.jasper.JasperException;

	public class RelEquipamento extends HttpServlet {
		
			private String pathJava, pathFlex;
			
			public RelEquipamento(){
				
			}
			public void service(HttpServletRequest request, HttpServletResponse response){
				
				if(this.pathJava == null && this.pathFlex == null){
					this.pathJava = this.getServletContext().getRealPath("WEB-INF/classes");
					this.pathFlex = this.getServletContext().getRealPath("/assets");
						
				}
			
				String relatorio = request.getParameter("relatorio");
				if(relatorio.equals("equipamento")){
					gerarRelEquipamento(request , response);
					
				}
			}
			
			private void gerarRelEquipamento(HttpServletRequest request,
					HttpServletResponse response) {
				// TODO Auto-generated method stub
				String relatorio = pathJava+"/RelEquipamento.jasper";
				
			}
	}